//Countedq.h
/********************************************************************************
*																				*
*	Author:			Vanessa Starkey												*
*	Assignment:		Assignment 8												*
*	Class:			CPS-151														*
*	Instructor:		V. Starkley													*
*	Due Date:		November 7													*
*																				*
*	This file delcares the counted queue class.									*
*																				*
********************************************************************************/

#ifndef COUNTEDQ_H
#define COUNTEDQ_H

#include "Queue2.h"

template<class ItemType>
class CountedQue : public QueType<ItemType>
{
public:
    CountedQue();

    bool Enqueue(ItemType newItem);
	//pre:  newItem has been initialized
	//post: if full, functions returns false
	//      else, newItem is added to queue,
	//      length of queue is increment, and
	//      function returns true

    bool Dequeue(ItemType& item);
	//pre:  none
	//post: if empty, functions returns false
	//      else, item contains top element of queue;
	//		top element is removed from queue,
	//		length is decremented and function and returns true

    int LengthIs() const;
    //pre:  none
	//post: returns the number of items on the queue

	void MakeEmpty();
	//pre:  none
	//post: empties the queue


private:
    int length;
};

#include "CountedQ.cpp"

#endif